//
//  Person.h
//  HomeWork-weekend
//
//  Created by 岁变 on 16/7/8.
//  Copyright © 2016年 岁变. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Person : NSObject

@property (nonatomic, retain) NSString *name;
@property (nonatomic, assign) NSInteger age;

- (instancetype)initWithName:(NSString *)name age:(NSInteger)age;
+ (instancetype)personWithName:(NSString *)naem age:(NSInteger)age;

- (NSComparisonResult)asSortedByName:(Person *)per;
- (NSComparisonResult)asSortedByAge:(Person *)per;

@end
